package org.jiuling.network.tools.response;

import org.jiuling.network.tools.response.enums.ResponseCodeEnum;

/**
 * 响应数据
 * @author 紫灵
 * @date 2021年09月09日 15时05分09秒
 */
@Deprecated
public class ResponseData<T> {

    public ResponseData() {}

    public ResponseData(ResponseCodeEnum responseCodeEnum,String msg) {
        this.code = responseCodeEnum.getCode();
        this.msg = msg;
    }

    public ResponseData(ResponseCodeEnum responseCodeEnum,String msg, T data) {
        this.code = responseCodeEnum.getCode();
        this.data = data;
        this.msg = msg;
    }

    public ResponseData(int code,String msg, T data) {
        this.code = code;
        this.data = data;
        this.msg = msg;
    }

    /** 响应代码 */
    private int code;
    /** 返回数据 */
    private T data;
    /** 返回信息 */
    private String msg;


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
